package org.mathig.poker.table;

import org.mathig.poker.StakesConfig;

/**
 * A table ok poker (10 players max).<br>
 * 
 * @author mathig
 */
public class TableConfig {

	public static TableConfig DEFAULT = new TableConfig();

	/** Default stack for each player at start of a tournament. */
	private int defaultStack = 1000;

	/** Count of seats by table. */
	private int seatCount = 10;

	/**
	 * Count of hands before change blinds.<br>
	 * i.e. each X hands blinds will grow up.
	 */
	private int handCountBlindChange = 10;

	/** List of blinds and antes. */
	private StakesConfig[] blinds = new StakesConfig[] { new StakesConfig(0, 5, 10), new StakesConfig(0, 5, 10), new StakesConfig(0, 10, 20),
			new StakesConfig(0, 15, 30), new StakesConfig(0, 20, 40), new StakesConfig(0, 30, 60), new StakesConfig(0, 50, 100), new StakesConfig(0, 75, 150),
			new StakesConfig(0, 100, 200), new StakesConfig(0, 150, 300), new StakesConfig(0, 200, 400), new StakesConfig(0, 300, 600),
			new StakesConfig(0, 400, 800), new StakesConfig(0, 600, 1200), new StakesConfig(0, 800, 1600), new StakesConfig(0, 1000, 2000) };

	public int getDefaultStack() {
		return defaultStack;
	}

	public void setDefaultStack(int stack) {
		this.defaultStack = stack;
	}

	public StakesConfig getBlinds(int index) {
		if (index < blinds.length)
			return blinds[index];
		else
			return blinds[blinds.length - 1];
	}

	public int getHandCountBlindChange() {
		return handCountBlindChange;
	}

	public int getSeatCount() {
		return seatCount;
	}

}
